package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.CouponInfoMapper;
import com.whq.entity.CouponInfo;
import com.whq.service.CouponInfoService;

@Service(value = "tdCouponInfoService")
public class CouponInfoServiceImpl implements CouponInfoService {

    @Autowired
    private CouponInfoMapper<CouponInfo>tdCouponInfoMapper;
    
    @Override
    public Integer insertSelective(CouponInfo tdCouponInfo) throws Exception {
           return this.tdCouponInfoMapper.insertSelective(tdCouponInfo);
        }

    @Override
    public Integer insertBatch(List<CouponInfo> tdCouponInfo) throws Exception {
           return this.tdCouponInfoMapper.insertBatch(tdCouponInfo) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdCouponInfoMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdCouponInfoMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(CouponInfo tdCouponInfo) {
           return this.tdCouponInfoMapper.updateByPrimaryKeySelective(tdCouponInfo);
    }

    @Override
    public CouponInfo findById(Object id) {
           return (CouponInfo) this.tdCouponInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<CouponInfo> selectByCondition(CouponInfo tdCouponInfo) {
           return (List<CouponInfo>) this.tdCouponInfoMapper.selectByCondition(tdCouponInfo);
    }

    @Override
    public Integer selectCountByCondition(CouponInfo tdCouponInfo) {
           return  this.tdCouponInfoMapper.selectCountByCondition(tdCouponInfo);
    }

}
